FROM fabric8/java-alpine-openjdk8-jdk

VOLUME /tmp

# 添加程序文件到容器
COPY zy-wechat-1.0.0-SNAPSHOT.jar app.jar

# 设置 JAVA_OPS
ENV JAVA_OPTS=""

ENV Active="dev"

ENV IP=""

ENV ZONE="http://192.168.10.1:7001/eureka"

# 日志文件
RUN ["/bin/mkdir", "-p", "/data/logs/"]

# 容器运行命令
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar app.jar --spring.profiles.active=$Active --eureka.instance.ip-address=$IP --eureka.client.serviceUrl.defaultZone=$ZONE" ]

# 端口暴露
EXPOSE 58888